﻿<%@ Page Language="C#" AutoEventWireup="true" EnableEventValidation="false" ValidateRequest="false"
    Inherits="MeetingCreation" CodeBehind="MeetingCreation.aspx.cs" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc2" %>
<%@ Register Assembly="AjaxControlLib" Namespace="AjaxControlLib" TagPrefix="cc1" %>
<%@ Register Assembly="ComponentGo.Web.Schedulers" Namespace="ComponentGo.Web.Schedulers"
    TagPrefix="gos" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Client Meeting Tool - Meetings </title>
    <link type="text/css" href="nac.css" rel="stylesheet" />
    <script src="Scripts/jquery-1.9.1.js" type="text/javascript"></script>
    <link href="CSS/jquery-ui-1.10.3.custom.css" rel="stylesheet" type="text/css" />
    <script src="Scripts/jquery-ui-1.10.3.custom.js" type="text/javascript"></script>
    <script language="javascript" type="text/javascript">
        var lastTab;
        function SetTabs() {
            $("#uwtMeetingTabContainer").tabs({
                active: lastTab,
                beforeActivate: function (event, ui) {
                    lastTab = ui.index;
                }
            });
        }
        $(function () {
            if (lastTab == undefined) {
                lastTab = 0
            }
            SetTabs();

            // For Date Picker
            $('.mydatepickerclass').datepicker({ showOn: "button",
                buttonImage: "_includes/images/ico_calbtn.gif",
                dateFormat: 'MM dd, yy',
                buttonImageOnly: true, onSelect: function () { }
            });
            Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
            $('.mydatepickerclass').attr("disabled", "disabled");

            function EndRequestHandler(sender, args) {
                $('.mydatepickerclass').datepicker({ showOn: "button",
                    buttonImage: "_includes/images/ico_calbtn.gif",
                    dateFormat: 'MM dd, yy',
                    buttonImageOnly: true, onSelect: function () { }
                });
                $('.mydatepickerclass').attr("disabled", "disabled");
            }


        });
        function ChangeTab(index) {
            lastTab = index;
            SetTabs();
        }
    </script>
    <style>
        body
        {
            font-family: Arial, Helvetica, sans-serif;
            font-size: 9pt;
        }
        
        .Button
        {
            background-color: #1e8ce1;
            border: #0d5b97 1px solid;
            color: #FFFFFF;
            font-family: Arial, Helvetica, sans-serif;
            font-size: 9pt;
            padding: 3px;
        }
        
        .Button1
        {
            background-color: #1e8ce1;
            border: #0d5b97 1px solid;
            color: #FFFFFF;
            font-family: Arial, Helvetica, sans-serif;
            font-size: 9pt;
            width: 28px;
            padding: 3px;
        }
        
        .overlay
        {
            position: absolute;
            background-color: white;
            top: auto;
            left: auto;
            width: 100%;
            height: 100%;
            opacity: 0.8;
            -moz-opacity: 0.8;
            filter: alpha(opacity=60);
            -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=60)";
            z-index: 10000;
            text-align: center;
            padding-top: 25%;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <cc2:ToolkitScriptManager ID="scmMeetingCreation" runat="server">
        </cc2:ToolkitScriptManager>
        <asp:UpdateProgress ID="uprgProgressBar" runat="server" DynamicLayout="true">
            <ProgressTemplate>
                <div class="overlay">
                    <img src="_includes/images/prog.gif" />
                    Loading...
                </div>
            </ProgressTemplate>
        </asp:UpdateProgress>
        <div id="divBanner">
            <cc1:Banner ID="bnrMeetingCreation" runat="server" Width="100%" />
        </div>
        <asp:UpdatePanel ID="upnlMeetings" runat="server" UpdateMode="Conditional">
            <ContentTemplate>
                <input id="txtAttendeeName" type="hidden" runat="server" value="" />
                <input id="hdnMeetingID" type="hidden" runat="server" value="" />
                <table id="tblBody" cellpadding="0" cellspacing="0" width="100%" style="height: 100%">
                    <tr>
                        <td>
                            <div id="uwtMeetingTabContainer">
                                <ul>
                                    <li><a href="#tpScheduleMeeting">Schedule Meeting</a></li>
                                    <li><a href="#tpSearchMeeting">Search Meeting</a></li>
                                </ul>
                                <div id="tpScheduleMeeting">
                                    <table id="tblCreateMeeting" cellpadding="0" cellspacing="0" width="99%" style="margin: 0px 15px 5px 15px;">
                                        <tr style="padding-bottom: 5px;">
                                            <td colspan="5" valign="top">
                                                <asp:Label ID="lblMessage" runat="server" ForeColor="Red"></asp:Label>
                                                <asp:ValidationSummary ID="vlsMeetingCreation" runat="server" CssClass="RequiredField"
                                                    HeaderText="Please fix the following errors:" ValidationGroup="Meeting" />
                                                <asp:UpdatePanel ID="upnlSaveAttendeeSchedule" runat="server" UpdateMode="Conditional">
                                                    <ContentTemplate>
                                                        <asp:ValidationSummary ID="vlsMeeting" runat="server" CssClass="RequiredField" HeaderText="Please fix the following errors:" />
                                                        <asp:ValidationSummary ID="vlsSaveAttendeeSchedule" runat="server" CssClass="RequiredField"
                                                            HeaderText="Please fix the following errors:" Visible="false" />
                                                    </ContentTemplate>
                                                </asp:UpdatePanel>
                                                <asp:CustomValidator ID="csvMeeting" runat="server" ErrorMessage="" Text="." Display="Dynamic"
                                                    Style="display: none;"></asp:CustomValidator>
                                            </td>
                                        </tr>
                                        <tr style="border-color: white;">
                                            <td class="GroupHeader" style="height: 18px; text-align: left;" colspan="6" valign="middle">
                                                Meeting Details
                                            </td>
                                        </tr>
                                        <tr style="padding-top: 5px; padding-left: 2px;">
                                            <td style="width: 15%;" valign="top">
                                                <asp:Label ID="lblEventName" runat="server" Text="Event"></asp:Label>
                                            </td>
                                            <td style="width: 20%;" valign="top">
                                                <table cellpadding="0" cellspacing="0">
                                                    <tr>
                                                        <td style="text-align: left">
                                                            <asp:DropDownList ID="ddlEventName" runat="server" DataValueField="EventID" DataTextField="EventName"
                                                                OnSelectedIndexChanged="ddlEventName_SelectedIndexChanged" AutoPostBack="True"
                                                                ValidationGroup="Meeting" Width="240" CssClass="RequiredField">
                                                            </asp:DropDownList>
                                                        </td>
                                                        <td>
                                                            <asp:RequiredFieldValidator ID="rfvEventName" InitialValue="0" runat="server" ErrorMessage="Select an event."
                                                                ControlToValidate="ddlEventName" ValidationGroup="Meeting" Display="Dynamic"
                                                                Text="*"></asp:RequiredFieldValidator>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </td>
                                            <td style="width: 15%;" valign="top">
                                                <asp:Label ID="lblMeetingType" runat="server" Text="Meeting Type"></asp:Label>
                                            </td>
                                            <td style="width: 20%;" valign="top">
                                                <asp:DropDownList ID="ddlMeetingType" runat="server" DataValueField="MeetingTypeID"
                                                    DataTextField="MeetingType" ValidationGroup="Meeting" AutoPostBack="true" Width="235"
                                                    CssClass="RequiredField" OnSelectedIndexChanged="ddlMeetingType_SelectedIndexChnaged">
                                                </asp:DropDownList>
                                                <asp:CustomValidator ID="csvMeetingType" runat="server" ErrorMessage="" Display="Dynamic"
                                                    Text="*"></asp:CustomValidator>
                                                <input id="hdnMeetingType" runat="server" type="hidden" />
                                                <asp:RequiredFieldValidator ID="rfvMeetingType" InitialValue="0" runat="server" ErrorMessage="Select a meeting type."
                                                    ControlToValidate="ddlMeetingType" ValidationGroup="Meeting" Display="Dynamic"
                                                    Text="*"></asp:RequiredFieldValidator>
                                            </td>
                                            <td valign="top" style="text-align: right;" rowspan="5">
                                                <table id="tblEventDetails" runat="server" style="display: none;" cellpadding="0"
                                                    cellspacing="0">
                                                    <tr style="text-align: left;">
                                                        <td class="GroupHeader" style="height: 18px; text-align: left;" valign="middle" colspan="2">
                                                            Event Details
                                                        </td>
                                                    </tr>
                                                    <tr style="padding-left: 3px; padding-top: 5px; text-align: left;">
                                                        <td valign="top" style="width: 70px;">
                                                            <asp:Label ID="lblEventStartDate" runat="server" Text="Start Date"></asp:Label>
                                                        </td>
                                                        <td valign="top">
                                                            :
                                                            <asp:Label ID="lblEventStartDateValue" runat="server" Text=""></asp:Label>
                                                        </td>
                                                    </tr>
                                                    <tr style="padding-left: 3px; padding-top: 5px; text-align: left;">
                                                        <td valign="top">
                                                            <asp:Label ID="lblEventEndDate" runat="server" Text="End Date"></asp:Label>
                                                        </td>
                                                        <td valign="top">
                                                            :
                                                            <asp:Label ID="lblEventEndDateValue" runat="server" Text=""></asp:Label>
                                                        </td>
                                                    </tr>
                                                    <tr style="padding-left: 3px; padding-top: 5px; text-align: left;">
                                                        <td valign="top">
                                                            <asp:Label ID="lblEventTimeZone" runat="server" Text="Time Zone"></asp:Label>
                                                        </td>
                                                        <td valign="top">
                                                            :
                                                            <asp:Label ID="lblEventTimeZoneValue" runat="server" Text=""></asp:Label>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </td>
                                        </tr>
                                        <tr style="padding-top: 5px; padding-left: 2px;">
                                            <td valign="top">
                                                <asp:Label ID="lblMeetingName" runat="server" Text="Meeting Name"></asp:Label>
                                            </td>
                                            <td valign="top">
                                                <asp:TextBox ID="txtMeetingName" runat="server" MaxLength="80" ValidationGroup="Meeting"
                                                    Width="235" CssClass="RequiredField"></asp:TextBox>
                                                <asp:RequiredFieldValidator ID="rfvMeetingName" runat="server" ErrorMessage="Provide the meeting name."
                                                    ControlToValidate="txtMeetingName" ValidationGroup="Meeting" Display="Dynamic"
                                                    Text="*"></asp:RequiredFieldValidator>
                                            </td>
                                            <td valign="top">
                                                <asp:Label ID="lblMeetingDate" runat="server" Text="Meeting Date"></asp:Label>
                                            </td>
                                            <td valign="top">
                                                <table cellpadding="0" cellspacing="0">
                                                    <tr>
                                                        <td>
                                                            <asp:TextBox ID="txtMeetingDate" runat="server" CssClass="mydatepickerclass"></asp:TextBox>
                                                        </td>
                                                        <td>
                                                            <asp:CustomValidator ID="csvMeetingDate" runat="server" ErrorMessage="" Display="Dynamic"
                                                                Text="*"></asp:CustomValidator>
                                                            <asp:RequiredFieldValidator ID="rfvMeetingDate" runat="server" ErrorMessage="Select a meeting date."
                                                                ControlToValidate="txtMeetingDate" ValidationGroup="Meeting" Display="Dynamic"
                                                                Text="*"></asp:RequiredFieldValidator>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </td>
                                            <td valign="top">
                                            </td>
                                        </tr>
                                        <tr style="padding-top: 5px; padding-left: 2px;">
                                            <td valign="top">
                                                <asp:Label ID="lblMeetingDescription" runat="server" Text="Meeting Description"></asp:Label>
                                            </td>
                                            <td valign="top">
                                                <asp:TextBox ID="txtMeetingDescription" runat="server" TextMode="MultiLine" Width="235"
                                                    Height="70px" onkeypress="return truncMaxLength(this,'8000');" onblur="truncMaxLength(this,'8000');"></asp:TextBox>
                                            </td>
                                            <td valign="top">
                                                <asp:Label ID="lblMeetingNote" runat="server" Text="Meeting Note"></asp:Label>
                                            </td>
                                            <td valign="top">
                                                <asp:TextBox ID="txtMeetingNote" runat="server" TextMode="MultiLine" Width="230"
                                                    Height="70px" onkeypress="return truncMaxLength(this,'8000');" onblur="truncMaxLength(this,'8000');"></asp:TextBox>
                                            </td>
                                            <td valign="top">
                                            </td>
                                        </tr>
                                        <tr style="padding-top: 5px; padding-left: 2px;">
                                            <td valign="top">
                                                <asp:Label ID="lblMeetingStartTime" runat="server" Text="Meeting Start Time"></asp:Label>
                                            </td>
                                            <td valign="top">
                                                <asp:DropDownList ID="ddlMeetingStartTimeHrs" runat="server" ValidationGroup="Meeting"
                                                    BackColor="LemonChiffon">
                                                    <asp:ListItem>00</asp:ListItem>
                                                    <asp:ListItem>01</asp:ListItem>
                                                    <asp:ListItem>02</asp:ListItem>
                                                    <asp:ListItem>03</asp:ListItem>
                                                    <asp:ListItem>04</asp:ListItem>
                                                    <asp:ListItem>05</asp:ListItem>
                                                    <asp:ListItem>06</asp:ListItem>
                                                    <asp:ListItem>07</asp:ListItem>
                                                    <asp:ListItem>08</asp:ListItem>
                                                    <asp:ListItem>09</asp:ListItem>
                                                    <asp:ListItem>10</asp:ListItem>
                                                    <asp:ListItem>11</asp:ListItem>
                                                    <asp:ListItem>12</asp:ListItem>
                                                    <asp:ListItem>13</asp:ListItem>
                                                    <asp:ListItem>14</asp:ListItem>
                                                    <asp:ListItem>15</asp:ListItem>
                                                    <asp:ListItem>16</asp:ListItem>
                                                    <asp:ListItem>17</asp:ListItem>
                                                    <asp:ListItem>18</asp:ListItem>
                                                    <asp:ListItem>19</asp:ListItem>
                                                    <asp:ListItem>20</asp:ListItem>
                                                    <asp:ListItem>21</asp:ListItem>
                                                    <asp:ListItem>22</asp:ListItem>
                                                    <asp:ListItem>23</asp:ListItem>
                                                </asp:DropDownList>
                                                <asp:DropDownList ID="ddlMeetingStartTimeMns" runat="server" ValidationGroup="Meeting"
                                                    BackColor="LemonChiffon">
                                                    <asp:ListItem>00</asp:ListItem>
                                                    <asp:ListItem>15</asp:ListItem>
                                                    <asp:ListItem>30</asp:ListItem>
                                                    <asp:ListItem>45</asp:ListItem>
                                                </asp:DropDownList>
                                                &nbsp;
                                                <asp:Label ID="lblMeetingEndTime" runat="server" Text="End Time"></asp:Label>
                                                <asp:DropDownList ID="ddlMeetingEndTimeHrs" runat="server" ValidationGroup="Meeting"
                                                    BackColor="LemonChiffon">
                                                    <asp:ListItem>00</asp:ListItem>
                                                    <asp:ListItem>01</asp:ListItem>
                                                    <asp:ListItem>02</asp:ListItem>
                                                    <asp:ListItem>03</asp:ListItem>
                                                    <asp:ListItem>04</asp:ListItem>
                                                    <asp:ListItem>05</asp:ListItem>
                                                    <asp:ListItem>06</asp:ListItem>
                                                    <asp:ListItem>07</asp:ListItem>
                                                    <asp:ListItem>08</asp:ListItem>
                                                    <asp:ListItem>09</asp:ListItem>
                                                    <asp:ListItem>10</asp:ListItem>
                                                    <asp:ListItem>11</asp:ListItem>
                                                    <asp:ListItem>12</asp:ListItem>
                                                    <asp:ListItem>13</asp:ListItem>
                                                    <asp:ListItem>14</asp:ListItem>
                                                    <asp:ListItem>15</asp:ListItem>
                                                    <asp:ListItem>16</asp:ListItem>
                                                    <asp:ListItem>17</asp:ListItem>
                                                    <asp:ListItem>18</asp:ListItem>
                                                    <asp:ListItem>19</asp:ListItem>
                                                    <asp:ListItem>20</asp:ListItem>
                                                    <asp:ListItem>21</asp:ListItem>
                                                    <asp:ListItem>22</asp:ListItem>
                                                    <asp:ListItem>23</asp:ListItem>
                                                </asp:DropDownList>
                                                <asp:DropDownList ID="ddlMeetingEndTimeMns" runat="server" ValidationGroup="Meeting"
                                                    BackColor="LemonChiffon">
                                                    <asp:ListItem>00</asp:ListItem>
                                                    <asp:ListItem>15</asp:ListItem>
                                                    <asp:ListItem>30</asp:ListItem>
                                                    <asp:ListItem>45</asp:ListItem>
                                                </asp:DropDownList>
                                                <asp:CustomValidator ID="csvMeetingSlot" runat="server" ErrorMessage="" Display="Dynamic"
                                                    Text="*"></asp:CustomValidator>
                                            </td>
                                            <td valign="top">
                                                <asp:Label ID="lblClientName" runat="server" Text="Client Name"></asp:Label>
                                            </td>
                                            <td valign="top">
                                                <asp:TextBox ID="txtClientName" runat="server" MaxLength="200" ValidationGroup="Meeting"
                                                    Width="230"></asp:TextBox>
                                            </td>
                                            <td valign="top">
                                            </td>
                                        </tr>
                                        <tr style="height: 5px; padding-left: 2px;">
                                            <td valign="top" style="padding-top: 5px; padding-left: 2px;">
                                                <asp:Label ID="lblMeetingLink" runat="server" Text="Client Details Link"></asp:Label>
                                            </td>
                                            <td valign="top" style="padding-top: 5px; padding-left: 2px;">
                                                <asp:TextBox ID="txtMeetingLink" runat="server" MaxLength="1000" ValidationGroup="Meeting"
                                                    Width="235"></asp:TextBox>
                                            </td>
                                            <td valign="top">
                                                <asp:Label ID="lblMeetingStatus" runat="server" Text="Status" Visible="False"></asp:Label>
                                            </td>
                                            <td valign="top">
                                                <asp:RadioButtonList ID="rblMeetingStatus" runat="server" DataTextField="MeetingStatus"
                                                    DataValueField="MeetingStatusID" Visible="False" RepeatDirection="Horizontal"
                                                    AutoPostBack="true" OnSelectedIndexChanged="rblMeetingStatus_SelectedIndexChanged">
                                                </asp:RadioButtonList>
                                            </td>
                                            <td valign="top">
                                            </td>
                                        </tr>
                                        <tr style="height: 5px;">
                                            <td valign="top">
                                            </td>
                                            <td valign="top">
                                            </td>
                                            <td valign="top">
                                            </td>
                                            <td valign="top">
                                            </td>
                                            <td valign="top">
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="GroupHeader" style="height: 18px; text-align: left;" colspan="6" valign="middle">
                                                Meeting Rooms
                                            </td>
                                        </tr>
                                        <tr style="padding-top: 5px; padding-left: 2px;">
                                            <td valign="top" style="vertical-align: middle;">
                                                <asp:Label ID="lblMeetingRoom" runat="server" Text="Meeting Room"></asp:Label>
                                            </td>
                                            <td valign="top" style="vertical-align: middle;">
                                                <asp:DropDownList ID="ddlMeetingRoom" runat="server" DataValueField="RoomID" DataTextField="RoomNameNumber"
                                                    Width="240" ValidationGroup="Meeting" CssClass="RequiredField" AutoPostBack="true"
                                                    OnSelectedIndexChanged="ddlMeetingRoom_SelectedIndexChanged">
                                                </asp:DropDownList>
                                                <input id="hdnSelectedRoomCapacity" runat="server" type="hidden" value="" />
                                                <asp:RequiredFieldValidator ID="rfvMeetingRoom" InitialValue="0" runat="server" ErrorMessage="Select a meeting room."
                                                    ControlToValidate="ddlMeetingRoom" ValidationGroup="Meeting" Display="Dynamic"
                                                    Text="*"></asp:RequiredFieldValidator>
                                                <asp:CustomValidator ID="csvMeetingRoom" runat="server" ErrorMessage="" Display="Dynamic"
                                                    Text="*"></asp:CustomValidator>
                                            </td>
                                            <td valign="top">
                                                <input id="btnShowHideRoomSchedule" type="button" value="Show Room Availability"
                                                    onclick="ShowHideRoomSchedule(this);" runat="server" style="width: 150px;" class="Button" />
                                                &nbsp;&nbsp;
                                            </td>
                                            <td valign="top">
                                            </td>
                                            <td valign="top">
                                            </td>
                                        </tr>
                                        <tr id="tdMeetingRoomSchedule" style="padding-top: 5px; padding-left: 2px; padding-right: 2px;
                                            display: none;">
                                            <td colspan="5">
                                                <gos:Scheduler ID="schMeetingRoom" runat="server" Height="200px" Width="100%" LinkLineMode="Invisible"
                                                    BehaviorOptions="None" AmPmMode="Hours24" BackColor="Lavender" TimeResolution="QuartHour"
                                                    Caption="Room Availability" Font-Names="Verdana" Font-Size="Small" ForeColor="Navy"
                                                    FreeDateColor="64, 64, 64" FreeTimeColor="LightGray" HorizontalHeaderLine="1px #404040 Solid"
                                                    HorizontalLine="1px DimGray Solid" VerticalLine0="1px DimGray Solid" VerticalLine1="1px DimGray Solid"
                                                    VerticalResourceLine="1px DimGray Solid" SplitterColor="64, 64, 64" VerticalLine2="1px #404040 Dotted"
                                                    BorderColor="#404040" BorderWidth="1px" EnableViewState="False" NumberOfCols="48"
                                                    CellWidth="19px">
                                                    <Columns>
                                                        <gos:ResourceColumn Text="Room" AllowEdit="False">
                                                        </gos:ResourceColumn>
                                                        <gos:ResourceColumn Text="Capacity" AllowEdit="False" DataIndex="1" Width="70px">
                                                        </gos:ResourceColumn>
                                                        <gos:ResourceColumn Text="Projector" AllowEdit="False" DataIndex="2" Width="65px">
                                                        </gos:ResourceColumn>
                                                        <gos:ResourceColumn Text="Conference Phone" AllowEdit="False" DataIndex="3" Width="120px">
                                                        </gos:ResourceColumn>
                                                        <gos:ResourceColumn Text="Flip Chart" AllowEdit="False" DataIndex="4" Width="65px">
                                                        </gos:ResourceColumn>
                                                        <gos:ResourceColumn Text="Network Connection" AllowEdit="False" DataIndex="5" Width="125px">
                                                        </gos:ResourceColumn>
                                                        <gos:ResourceColumn Text="White Board" AllowEdit="False" DataIndex="6" Width="80px">
                                                        </gos:ResourceColumn>
                                                        <gos:ResourceColumn Text="Phone Number" AllowEdit="False" DataIndex="7" Width="110px">
                                                        </gos:ResourceColumn>
                                                    </Columns>
                                                    <CaptionStyle HorizontalAlign="Center" BackColor="Gray" Font-Bold="True" ForeColor="Linen"
                                                        Border="1px #404040 Solid">
                                                    </CaptionStyle>
                                                    <BodyStyle BackColor="LightGray">
                                                    </BodyStyle>
                                                    <ResourceListStyle BackColor="LightGray" ForeColor="Black">
                                                    </ResourceListStyle>
                                                    <ResourceHeaderStyle BackColor="Gray" ForeColor="Black" HorizontalAlign="Center">
                                                    </ResourceHeaderStyle>
                                                    <TimeLineStyle Font-Size="Small" BackColor="DarkGray" Font-Bold="True" ForeColor="64, 64, 64">
                                                    </TimeLineStyle>
                                                    <DefaultItemStyle BackColor="Gray" ForeColor="Black">
                                                    </DefaultItemStyle>
                                                    <NextButton Visible="False">
                                                    </NextButton>
                                                    <PreviousButton Visible="False">
                                                    </PreviousButton>
                                                </gos:Scheduler>
                                            </td>
                                        </tr>
                                        <tr style="height: 5px;">
                                            <td valign="top">
                                            </td>
                                            <td valign="top">
                                            </td>
                                            <td valign="top">
                                            </td>
                                            <td valign="top">
                                            </td>
                                            <td valign="top">
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="GroupHeader" style="height: 18px; text-align: left;" colspan="6" valign="middle">
                                                Meeting Attendee
                                            </td>
                                        </tr>
                                        <asp:UpdatePanel ID="upnlMeetingAttendee" runat="server" UpdateMode="Conditional">
                                            <ContentTemplate>
                                                <tr style="padding-top: 5px; padding-left: 2px;">
                                                    <td valign="top" style="padding-top: 10px;">
                                                        <asp:Label ID="lblMeetingAttendee" runat="server" Text="Meeting Attendee"></asp:Label>
                                                    </td>
                                                    <td valign="top" colspan="3">
                                                        <table id="tblMeetingAttendee" cellpadding="0" cellspacing="0">
                                                            <tr>
                                                                <td>
                                                                </td>
                                                            </tr>
                                                            <tr style="padding-top: 6px;">
                                                                <td rowspan="4" valign="middle">
                                                                    <asp:ListBox ID="lstEventAttendee" runat="server" SelectionMode="multiple" DataTextField="EmailName"
                                                                        DataValueField="eventattendeeid" ValidationGroup="meetingattendee" Width="290px"
                                                                        Height="145px"></asp:ListBox>
                                                                </td>
                                                                <td align="center" style="padding-right: 5px; padding-left: 5px; vertical-align: middle;">
                                                                    <asp:Button ID="btnAllRight" runat="server" OnClick="btnAllRight_Click" CssClass="Button"
                                                                        Text="&gt;&gt;" />
                                                                </td>
                                                                <td rowspan="4" valign="middle">
                                                                    <asp:ListBox ID="lstMeetingAttendee" runat="server" SelectionMode="Multiple" ValidationGroup="MeetingAttendee"
                                                                        DataValueField="eventattendeeid" DataTextField="EmailName" Width="290px" Height="145px"
                                                                        CssClass="RequiredField"></asp:ListBox>
                                                                    <asp:RequiredFieldValidator ID="rfvMeetingAttndee" SetFocusOnError="true" runat="server"
                                                                        ErrorMessage="Select atleast one attendee." ControlToValidate="lstMeetingAttendee"
                                                                        ValidationGroup="Meeting" Display="Dynamic" Text="*"></asp:RequiredFieldValidator>
                                                                    <asp:CustomValidator ID="csvMeetingAttendee" runat="server" ErrorMessage="" Display="Dynamic"
                                                                        Text="*"></asp:CustomValidator>
                                                                </td>
                                                                <td rowspan="4" style="padding-left: 5px;">
                                                                    &nbsp;
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td align="center" style="padding-right: 5px; padding-left: 5px; vertical-align: middle;">
                                                                    <asp:Button ID="btnRight" runat="server" Text="&gt;" CssClass="Button1" OnClick="btnRight_Click" />
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td align="center" style="padding-right: 5px; padding-left: 5px; vertical-align: middle;">
                                                                    <asp:Button ID="btnLeft" runat="server" Text="&lt;" CssClass="Button1" OnClick="btnLeft_Click" />
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td align="center" style="padding-right: 5px; padding-left: 5px; padding-bottom: 7px;
                                                                    vertical-align: middle;">
                                                                    <asp:Button ID="btnAllLeft" runat="server" Text="&lt;&lt;" CssClass="Button" OnClick="btnAllLeft_Click" />
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td colspan="4" align="right" style="padding-right: 10px; padding-bottom: 2px; vertical-align: top;">
                                                                    <asp:Button ID="btnCheckAvailability" runat="server" OnClick="btnCheckAvailability_Click"
                                                                        Text="Check Availability" Width="120px" CssClass="Button" />
                                                                    <asp:Button ID="btnSchedule" runat="server" Text="Schedule" CssClass="Button" OnClick="btnSchedule_Click"
                                                                        ValidationGroup="Meeting" />
                                                                    <%--<asp:Label ID="lblMeetingErrorMessage" runat="server" Text="" ForeColor="Red"></asp:Label>--%>
                                                                </td>
                                                            </tr>
                                                        </table>
                                                    </td>
                                                    <td valign="top" colspan="3">
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td valign="top">
                                                    </td>
                                                    <td valign="top">
                                                    </td>
                                                    <td valign="top">
                                                    </td>
                                                    <td valign="top">
                                                    </td>
                                                    <td valign="top">
                                                    </td>
                                                </tr>
                                            </ContentTemplate>
                                            <Triggers>
                                                <asp:AsyncPostBackTrigger ControlID="btnClearAll" EventName="Click" />
                                                <asp:AsyncPostBackTrigger ControlID="ddlEventName" EventName="SelectedIndexChanged" />
                                                <asp:AsyncPostBackTrigger ControlID="rblMeetingStatus" EventName="SelectedIndexChanged" />
                                            </Triggers>
                                        </asp:UpdatePanel>
                                        <tr style="padding-right: 2px;">
                                            <td colspan="5" valign="top">
                                                <asp:UpdatePanel ID="upnlSchedulerAvailability" runat="server" UpdateMode="Conditional">
                                                    <ContentTemplate>
                                                        <gos:Scheduler ID="schSchedulerAvailability" runat="server" Height="200px" Width="100%"
                                                            LinkLineMode="Invisible" BehaviorOptions="None" AmPmMode="Hours24" BackColor="Lavender"
                                                            DragResolution="QuartHour" TimeResolution="QuartHour" Caption="Attendee Availability"
                                                            Font-Names="Verdana" Font-Size="Small" ForeColor="Navy" FreeDateColor="#404040"
                                                            FreeTimeColor="LightGray" HorizontalHeaderLine="1px #404040 Solid" HorizontalLine="1px DimGray Solid"
                                                            VerticalLine0="1px DimGray Solid" VerticalLine1="1px DimGray Solid" VerticalResourceLine="1px DimGray Solid"
                                                            SplitterColor="64, 64, 64" VerticalLine2="1px #404040 Dotted" BorderColor="#404040"
                                                            BorderWidth="1px" CellWidth="19px">
                                                            <Columns>
                                                                <gos:ResourceColumn Text="Attendee Name" AllowEdit="false" Width="100%">
                                                                </gos:ResourceColumn>
                                                            </Columns>
                                                            <CaptionStyle HorizontalAlign="Center" BackColor="Gray" Font-Bold="True" ForeColor="Linen"
                                                                Border="1px #404040 Solid">
                                                            </CaptionStyle>
                                                            <BodyStyle BackColor="LightGray">
                                                            </BodyStyle>
                                                            <ResourceListStyle BackColor="LightGray" ForeColor="Black">
                                                            </ResourceListStyle>
                                                            <ResourceHeaderStyle BackColor="Gray" ForeColor="Black" HorizontalAlign="Center">
                                                            </ResourceHeaderStyle>
                                                            <TimeLineStyle Font-Size="Small" BackColor="DarkGray" Font-Bold="True" ForeColor="#404040">
                                                            </TimeLineStyle>
                                                            <DefaultItemStyle BackColor="Gray" ForeColor="Black">
                                                            </DefaultItemStyle>
                                                            <NextButton Visible="false">
                                                            </NextButton>
                                                            <PreviousButton Visible="false">
                                                            </PreviousButton>
                                                        </gos:Scheduler>
                                                    </ContentTemplate>
                                                    <Triggers>
                                                        <asp:AsyncPostBackTrigger ControlID="btnCheckAvailability" EventName="Click" />
                                                        <asp:AsyncPostBackTrigger ControlID="ddlEventName" EventName="SelectedIndexChanged" />
                                                        <asp:AsyncPostBackTrigger ControlID="btnSchedule" EventName="Click" />
                                                        <asp:AsyncPostBackTrigger ControlID="btnSaveMeeting" EventName="Click" />
                                                        <asp:AsyncPostBackTrigger ControlID="btnClearAll" EventName="Click" />
                                                        <asp:AsyncPostBackTrigger ControlID="rblMeetingStatus" EventName="SelectedIndexChanged" />
                                                    </Triggers>
                                                </asp:UpdatePanel>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="5" valign="top">
                                                <asp:UpdatePanel ID="upnlMeetingScheduler" runat="server" UpdateMode="Conditional">
                                                    <ContentTemplate>
                                                        <table cellpadding="0" cellspacing="0" style="width: 100%;">
                                                            <%--<tr style="padding-bottom: 5px;">
                                                                        <td colspan="2" valign="bottom">
                                                                            
                                                                        </td>
                                                                    </tr>--%>
                                                            <tr style="padding-right: 2px;">
                                                                <td id="tdMeetingScheduler" runat="server" style="width: 100%;">
                                                                    <asp:Label ID="lblHost" runat="server" Text="" Height="13px" Width="13px" BackColor="#778899"
                                                                        BorderColor="Black" BorderStyle="Solid" BorderWidth="1px"></asp:Label>
                                                                    <asp:Label ID="lblHostLegend" runat="server" Text="&nbsp; - Host" Style="padding-bottom: 10px;"></asp:Label>
                                                                    &nbsp;<br />
                                                                    <input id="hdnSchedulerWidth" runat="server" type="hidden" />
                                                                    <input id="hdnMeetingAttendeeCount" runat="server" type="hidden" />
                                                                    <gos:Scheduler ID="schMeetingScheduler" runat="server" Height="200px" Width="100%"
                                                                        EnableViewState="false" ProgressHtml="" ProgressImageUrl="none" LinkLineMode="Invisible"
                                                                        BehaviorOptions="None" AmPmMode="Hours24" BackColor="SaddleBrown" DragResolution="QuartHour"
                                                                        TimeResolution="QuartHour" Caption="Meeting Schedule" OnItemDragged="schMeetingScheduler_ItemDragged"
                                                                        Font-Names="Verdana" Font-Size="Small" ForeColor="Navy" FreeDateColor="#404040"
                                                                        FreeTimeColor="LightGray" HorizontalHeaderLine="1px #404040 Solid" HorizontalLine="1px DimGray Solid"
                                                                        VerticalLine0="1px DimGray Solid" VerticalLine1="1px DimGray Solid" VerticalResourceLine="1px DimGray Solid"
                                                                        SplitterColor="64, 64, 64" VerticalLine2="1px #404040 Dotted" BorderColor="#404040"
                                                                        BorderWidth="1px" ProgressTimeout="0" CellWidth="19px">
                                                                        <Columns>
                                                                            <gos:ResourceColumn Text="Attendee Name" AllowEdit="false" ShowTree="True" Width="100%"
                                                                                DataIndex="0">
                                                                            </gos:ResourceColumn>
                                                                            <gos:ResourceColumn Text="Attendee ID" AllowEdit="false" Width="0%" DataIndex="1">
                                                                            </gos:ResourceColumn>
                                                                            <gos:ResourceColumn Text="IsHost" AllowEdit="False" DataIndex="2" Width="0%">
                                                                            </gos:ResourceColumn>
                                                                            <gos:ResourceColumn Text="IsClient" AllowEdit="False" DataIndex="2" Width="0%">
                                                                            </gos:ResourceColumn>
                                                                            <gos:ResourceColumn Text="Issues" AllowEdit="False" DataIndex="2" Width="0%">
                                                                            </gos:ResourceColumn>
                                                                            <gos:ResourceColumn Text="Countries" AllowEdit="False" DataIndex="2" Width="0%">
                                                                            </gos:ResourceColumn>
                                                                        </Columns>
                                                                        <CaptionStyle HorizontalAlign="Center" BackColor="Gray" Font-Bold="True" ForeColor="Linen"
                                                                            Border="1px #404040 Solid">
                                                                        </CaptionStyle>
                                                                        <BodyStyle BackColor="LightGray">
                                                                        </BodyStyle>
                                                                        <ResourceListStyle BackColor="LightGray" ForeColor="Black">
                                                                        </ResourceListStyle>
                                                                        <ResourceHeaderStyle BackColor="Gray" ForeColor="Black" HorizontalAlign="Center">
                                                                        </ResourceHeaderStyle>
                                                                        <TimeLineStyle Font-Size="Small" BackColor="DarkGray" Font-Bold="True" ForeColor="#404040">
                                                                        </TimeLineStyle>
                                                                        <DefaultItemStyle BackColor="Gray" ForeColor="Black">
                                                                        </DefaultItemStyle>
                                                                        <NextButton Visible="false">
                                                                        </NextButton>
                                                                        <PreviousButton Visible="false">
                                                                        </PreviousButton>
                                                                    </gos:Scheduler>
                                                                    <asp:CustomValidator ID="csvMeetingAttendeeSchedule" runat="server" ErrorMessage=""
                                                                        Display="Dynamic" Text="*"></asp:CustomValidator>
                                                                    <%--<asp:Label ID="lblSchedulerErrorMessage" runat="server" Text="" ForeColor="Red"></asp:Label>--%>
                                                                    <asp:Button ID="btnEditSchedule" runat="server" Text="Button" Style="display: none;"
                                                                        OnClick="btnEditSchedule_Click" />
                                                                </td>
                                                                <td style="padding-left: 10px;">
                                                                    <table id="tblScheduleAttendee" runat="server" cellpadding="0" cellspacing="0" style="display: none;">
                                                                        <tr>
                                                                            <td class="GroupHeader" style="height: 18px; text-align: left;" colspan="4" valign="middle">
                                                                                <asp:Label ID="lblAttendeeName" runat="server" Text=""></asp:Label>
                                                                            </td>
                                                                        </tr>
                                                                        <tr style="padding-top: 5px; padding-left: 2px;">
                                                                            <td>
                                                                                <asp:Label ID="lblAttedeeStartTime" runat="server" Text="Start Time "></asp:Label>
                                                                            </td>
                                                                            <td valign="top">
                                                                                <asp:DropDownList ID="ddlAttendeeStartTimeHrs" runat="server" ValidationGroup="AttendeeSchedule">
                                                                                    <asp:ListItem>00</asp:ListItem>
                                                                                    <asp:ListItem>01</asp:ListItem>
                                                                                    <asp:ListItem>02</asp:ListItem>
                                                                                    <asp:ListItem>03</asp:ListItem>
                                                                                    <asp:ListItem>04</asp:ListItem>
                                                                                    <asp:ListItem>05</asp:ListItem>
                                                                                    <asp:ListItem>06</asp:ListItem>
                                                                                    <asp:ListItem>07</asp:ListItem>
                                                                                    <asp:ListItem>08</asp:ListItem>
                                                                                    <asp:ListItem>09</asp:ListItem>
                                                                                    <asp:ListItem>10</asp:ListItem>
                                                                                    <asp:ListItem>11</asp:ListItem>
                                                                                    <asp:ListItem>12</asp:ListItem>
                                                                                    <asp:ListItem>13</asp:ListItem>
                                                                                    <asp:ListItem>14</asp:ListItem>
                                                                                    <asp:ListItem>15</asp:ListItem>
                                                                                    <asp:ListItem>16</asp:ListItem>
                                                                                    <asp:ListItem>17</asp:ListItem>
                                                                                    <asp:ListItem>18</asp:ListItem>
                                                                                    <asp:ListItem>19</asp:ListItem>
                                                                                    <asp:ListItem>20</asp:ListItem>
                                                                                    <asp:ListItem>21</asp:ListItem>
                                                                                    <asp:ListItem>22</asp:ListItem>
                                                                                    <asp:ListItem>23</asp:ListItem>
                                                                                </asp:DropDownList>
                                                                                <asp:DropDownList ID="ddlAttendeeStartTimeMns" runat="server" ValidationGroup="AttendeeSchedule">
                                                                                    <asp:ListItem>00</asp:ListItem>
                                                                                    <asp:ListItem>15</asp:ListItem>
                                                                                    <asp:ListItem>30</asp:ListItem>
                                                                                    <asp:ListItem>45</asp:ListItem>
                                                                                </asp:DropDownList>
                                                                            </td>
                                                                            <td>
                                                                                <asp:Label ID="lblAttedeeEndTime" runat="server" Text="End Time "></asp:Label>
                                                                            </td>
                                                                            <td valign="top">
                                                                                <asp:DropDownList ID="ddlAttendeeEndTimeHrs" runat="server" ValidationGroup="AttendeeSchedule">
                                                                                    <asp:ListItem>00</asp:ListItem>
                                                                                    <asp:ListItem>01</asp:ListItem>
                                                                                    <asp:ListItem>02</asp:ListItem>
                                                                                    <asp:ListItem>03</asp:ListItem>
                                                                                    <asp:ListItem>04</asp:ListItem>
                                                                                    <asp:ListItem>05</asp:ListItem>
                                                                                    <asp:ListItem>06</asp:ListItem>
                                                                                    <asp:ListItem>07</asp:ListItem>
                                                                                    <asp:ListItem>08</asp:ListItem>
                                                                                    <asp:ListItem>09</asp:ListItem>
                                                                                    <asp:ListItem>10</asp:ListItem>
                                                                                    <asp:ListItem>11</asp:ListItem>
                                                                                    <asp:ListItem>12</asp:ListItem>
                                                                                    <asp:ListItem>13</asp:ListItem>
                                                                                    <asp:ListItem>14</asp:ListItem>
                                                                                    <asp:ListItem>15</asp:ListItem>
                                                                                    <asp:ListItem>16</asp:ListItem>
                                                                                    <asp:ListItem>17</asp:ListItem>
                                                                                    <asp:ListItem>18</asp:ListItem>
                                                                                    <asp:ListItem>19</asp:ListItem>
                                                                                    <asp:ListItem>20</asp:ListItem>
                                                                                    <asp:ListItem>21</asp:ListItem>
                                                                                    <asp:ListItem>22</asp:ListItem>
                                                                                    <asp:ListItem>23</asp:ListItem>
                                                                                </asp:DropDownList>
                                                                                <asp:DropDownList ID="ddlAttendeeEndTimeMns" runat="server" ValidationGroup="AttendeeSchedule">
                                                                                    <asp:ListItem>00</asp:ListItem>
                                                                                    <asp:ListItem>15</asp:ListItem>
                                                                                    <asp:ListItem>30</asp:ListItem>
                                                                                    <asp:ListItem>45</asp:ListItem>
                                                                                </asp:DropDownList>
                                                                                <asp:CustomValidator ID="csvMeetingScheduler" runat="server" ErrorMessage="" Text="*"
                                                                                    Display="Dynamic"></asp:CustomValidator>
                                                                            </td>
                                                                        </tr>
                                                                        <tr style="padding-top: 5px; vertical-align: top; padding-left: 2px;">
                                                                            <td valign="top" colspan="4" style="vertical-align: top;">
                                                                                <table id="tblAttendeeSchedule" cellpadding="0" cellspacing="0">
                                                                                    <tr>
                                                                                        <td valign="top" style="width: 65px;">
                                                                                            <asp:Label ID="lblIssues" runat="server" Text="Issue(s)"></asp:Label>
                                                                                        </td>
                                                                                        <td valign="top">
                                                                                            <asp:TextBox ID="txtIssues" runat="server" TextMode="MultiLine" Width="230" Height="70px"
                                                                                                onkeypress="return truncMaxLength(this,'1500');" onblur="truncMaxLength(this,'1500');"></asp:TextBox>
                                                                                        </td>
                                                                                    </tr>
                                                                                    <tr style="padding-top: 5px;">
                                                                                        <td valign="top">
                                                                                            <asp:Label ID="lblIsHost" runat="server" Text="Host"></asp:Label>
                                                                                        </td>
                                                                                        <td valign="top">
                                                                                            <asp:CheckBox ID="chkIsHost" runat="server" Checked="false" />
                                                                                        </td>
                                                                                    </tr>
                                                                                    <tr style="padding-top: 5px;">
                                                                                        <td valign="top">
                                                                                            <asp:Label ID="lblCountries" runat="server" Text="Countries"></asp:Label>
                                                                                        </td>
                                                                                        <td valign="top">
                                                                                            <asp:CheckBoxList ID="cblCountries" runat="server" RepeatColumns="2" RepeatDirection="Horizontal"
                                                                                                Font-Size="XX-Small" />
                                                                                        </td>
                                                                                    </tr>
                                                                                </table>
                                                                            </td>
                                                                        </tr>
                                                                        <tr style="padding-top: 5px; padding-left: 2px;">
                                                                            <td colspan="4">
                                                                                <asp:Button ID="btnAttendeeScheduleSave" runat="server" OnClick="btnAttendeeScheduleSave_Click"
                                                                                    Text="Save" Width="100px" CssClass="Button" />
                                                                                <input id="btnAttendeeScheduleCancel" type="button" value="Cancel" onclick="CancelAttendeeSchedule();"
                                                                                    style="width: 60px;" class="Button" />
                                                                            </td>
                                                                        </tr>
                                                                        <tr style="padding-top: 5px; padding-left: 2px;">
                                                                            <td colspan="4">
                                                                                <%--<asp:Label ID="lblErrorMessage" runat="server" ForeColor="Red" Text=""></asp:Label>--%>
                                                                            </td>
                                                                        </tr>
                                                                    </table>
                                                                </td>
                                                            </tr>
                                                        </table>
                                                    </ContentTemplate>
                                                    <Triggers>
                                                        <asp:AsyncPostBackTrigger ControlID="btnAttendeeScheduleSave" EventName="Click" />
                                                        <asp:AsyncPostBackTrigger ControlID="btnSchedule" EventName="Click" />
                                                        <asp:AsyncPostBackTrigger ControlID="ddlEventName" EventName="SelectedIndexChanged" />
                                                        <asp:AsyncPostBackTrigger ControlID="rblMeetingStatus" EventName="SelectedIndexChanged" />
                                                        <asp:AsyncPostBackTrigger ControlID="btnCheckAvailability" EventName="Click" />
                                                        <asp:AsyncPostBackTrigger ControlID="btnClearAll" EventName="Click" />
                                                        <asp:AsyncPostBackTrigger ControlID="btnSaveMeeting" EventName="Click" />
                                                    </Triggers>
                                                </asp:UpdatePanel>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="5" valign="top">
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="5" valign="top" style="padding-top: 2px;">
                                                <input id="hdnAllCleasred" runat="server" type="hidden" />
                                                <asp:Button ID="btnSaveMeeting" runat="server" Text="Save Meeting" Width="150px"
                                                    OnClientClick="return CheckRoomCapacity();" OnClick="btnSaveMeeting_Click" ValidationGroup="Meeting"
                                                    CssClass="Button" ToolTip="Click here to save the meeting." />
                                                <asp:Button ID="btnClearAll" runat="server" Text="Clear All" Width="90px" OnClick="btnClearAll_Click"
                                                    OnClientClick="return ClearAllFields();" CssClass="Button" ToolTip="Click here to clear all the entered fields." />
                                                <%-- <asp:Button ID="btnSendMail" runat="server" Text="Send Mail" Width="90px" OnClick="btnSendMail_Click"
                                                            CssClass="Button" ToolTip="Click here to send mail to the participant(s)."/>--%>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                                <div id="tpSearchMeeting">
                                    <asp:UpdatePanel ID="upnlMeetingSearch" runat="server" UpdateMode="Conditional">
                                        <ContentTemplate>
                                            <table id="tblSearchMeeting" cellpadding="0" cellspacing="0" width="99%" style="margin: 5px 15px 5px 15px;">
                                                <tr style="padding-bottom: 5px;">
                                                    <td colspan="4" valign="top">
                                                        <asp:Label ID="lblMailMessage" runat="server" ForeColor="ForestGreen"></asp:Label>
                                                    </td>
                                                </tr>
                                                <tr style="border-color: white;">
                                                    <td class="GroupHeader" style="height: 18px; text-align: left;" colspan="4" valign="middle">
                                                        Meeting Search
                                                    </td>
                                                </tr>
                                                <tr style="padding-top: 5px; padding-left: 2px;">
                                                    <td style="width: 15%;" valign="top">
                                                        <asp:Label ID="lblSearchEvent" runat="server" Text="Event"></asp:Label>
                                                    </td>
                                                    <td style="width: 20%;" valign="top">
                                                        <asp:DropDownList ID="ddlSearchEvent" runat="server" DataValueField="EventID" DataTextField="EventName"
                                                            Width="215" OnSelectedIndexChanged="ddlSearchEvent_SelectedIndexChanged" AutoPostBack="true">
                                                        </asp:DropDownList>
                                                    </td>
                                                    <td style="width: 15%;" valign="top">
                                                        <asp:Label ID="lblSearchMeetingType" runat="server" Text="Meeting Type"></asp:Label>
                                                    </td>
                                                    <td style="width: 50%;" valign="top">
                                                        <asp:DropDownList ID="ddlSearchMeetingType" runat="server" DataValueField="MeetingTypeID"
                                                            DataTextField="MeetingType" Width="215">
                                                        </asp:DropDownList>
                                                    </td>
                                                </tr>
                                                <tr style="padding-top: 5px; padding-left: 2px;">
                                                    <td valign="top">
                                                        <asp:Label ID="lblSearchMeetingName" runat="server" Text="Meeting Name"></asp:Label>
                                                    </td>
                                                    <td valign="top">
                                                        <asp:TextBox ID="txtSearchMeetingName" runat="server" MaxLength="50" Width="210"></asp:TextBox>
                                                    </td>
                                                    <td valign="top">
                                                        <asp:Label ID="lblSearchMeetingDate" runat="server" Text="Meeting Date"></asp:Label>
                                                    </td>
                                                    <td valign="top">
                                                        <asp:TextBox ID="txtSearchMeetingDate" runat="server" CssClass="mydatepickerclass"></asp:TextBox>
                                                    </td>
                                                </tr>
                                                <tr style="padding-top: 5px; padding-left: 2px;">
                                                    <td valign="top">
                                                        <asp:Label ID="lblSearchMeetingRoom" runat="server" Text="Meeting Room"></asp:Label>
                                                    </td>
                                                    <td valign="top">
                                                        <asp:DropDownList ID="ddlSearchMeetingRoom" runat="server" DataValueField="RoomID"
                                                            DataTextField="RoomNameNumber" Width="215">
                                                        </asp:DropDownList>
                                                    </td>
                                                    <td valign="top" style="text-align: left">
                                                        <asp:Label ID="lblSearchMeetingStatus" runat="server" Text="Status"></asp:Label>
                                                    </td>
                                                    <td valign="top">
                                                        <asp:RadioButtonList ID="rblSearchMeetingStatus" runat="server" DataTextField="MeetingStatus"
                                                            DataValueField="MeetingStatusID" RepeatDirection="Horizontal">
                                                        </asp:RadioButtonList>
                                                    </td>
                                                </tr>
                                                <tr style="padding-bottom: 3px;">
                                                    <td colspan="4" valign="top">
                                                        <asp:Button ID="btnSearch" runat="server" Text="Search" Width="90px" OnClick="btnSearch_Click"
                                                            CssClass="Button" />
                                                        <asp:Button ID="btnClearSearch" runat="server" Text="Clear Search" Width="90px" OnClick="btnClearSearch_Click"
                                                            CssClass="Button" />
                                                    </td>
                                                </tr>
                                                <tr style="height: 10px;">
                                                    <td colspan="4" valign="top">
                                                    </td>
                                                </tr>
                                                <tr style="height: 5px;">
                                                    <td colspan="4" valign="top">
                                                        <div id="divScroll" style="overflow: auto; width: 97%; position: absolute; float: left;
                                                            height: 280px">
                                                            <asp:GridView ID="wgSearchMeeting" runat="server" AllowPaging="true" OnPageIndexChanging="wgSearchMeeting_PageIndexChanged"
                                                                AutoGenerateColumns="false" PageSize="10" OnRowCommand="wgSearchMeeting_ItemCommand"
                                                                ShowFooter="false" Width="100%" Visible="false" SelectedRowStyle-CssClass="GridSelectedRow"
                                                                AlternatingRowStyle-BackColor="Azure" PagerSettings-Mode="Numeric" PagerStyle-HorizontalAlign="Left">
                                                                <Columns>
                                                                    <asp:BoundField DataField="MeetingID" Visible="false" />
                                                                    <asp:BoundField DataField="Event Name" ControlStyle-Width="150px" HeaderText="Event Name" />
                                                                    <asp:BoundField DataField="Meeting Name" ControlStyle-Width="150px" HeaderText="Meeting Name" />
                                                                    <asp:BoundField DataField="Description" ControlStyle-Width="200px" HeaderText="Description" />
                                                                    <asp:BoundField DataField="Note" ControlStyle-Width="200px" HeaderText="Note" />
                                                                    <asp:BoundField DataField="Meeting Type" ControlStyle-Width="150px" HeaderText="Meeting Type" />
                                                                    <asp:BoundField DataField="Meeting Date" ControlStyle-Width="80px" HeaderText="Meeting Date" />
                                                                    <asp:BoundField DataField="Start Time" ControlStyle-Width="60px" HeaderText="Start Time" />
                                                                    <asp:BoundField DataField="End Time" ControlStyle-Width="60px" HeaderText="End Time" />
                                                                    <asp:BoundField DataField="Country" ControlStyle-Width="60px" HeaderText="Country" />
                                                                    <asp:BoundField DataField="Room" ControlStyle-Width="120px" HeaderText="Room" />
                                                                    <asp:BoundField DataField="Meeting Status" ControlStyle-Width="80px" HeaderText="Meeting Status" />
                                                                    <asp:TemplateField>
                                                                        <ItemTemplate>
                                                                            <asp:ImageButton ID="ibtnEditMeeting" runat="server" Style="cursor: pointer;" ToolTip="Edit Meeting"
                                                                                CommandName="EditMeeting" AlternateText="Edit" ImageUrl="_includes/images/edit.png"
                                                                                CommandArgument='<%# Eval("MeetingID") %>' />
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField>
                                                                        <ItemTemplate>
                                                                            <asp:ImageButton ID="ibtnSendMeetingMail" runat="server" Style="cursor: pointer;"
                                                                                ToolTip="Send Mail To Attendee" CommandName="SendMail" AlternateText="Send Mail"
                                                                                CommandArgument='<%# Eval("MeetingID") %>' ImageUrl="_includes/images/SendMeetingMail.jpg" />
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                </Columns>
                                                                <HeaderStyle BackColor="#11459E" BorderStyle="Solid" BorderWidth="1px" Font-Bold="true"
                                                                    Font-Names="Arial" Font-Size="X-Small" ForeColor="#E1E8F5" />
                                                                <RowStyle BorderColor="Black" BorderStyle="Solid" BorderWidth="1px" BackColor="White" />
                                                                <PagerStyle BackColor="#D1D0CE" Wrap="true" Font-Bold="true" HorizontalAlign="Left" />
                                                            </asp:GridView>
                                                        </div>
                                                        <asp:Label ID="lblNoMeetingFound" runat="server" Text="No Meeting Found." Visible="false"></asp:Label>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td colspan="4" style="height: 280px;">
                                                        &nbsp;
                                                    </td>
                                                </tr>
                                            </table>
                                        </ContentTemplate>
                                    </asp:UpdatePanel>
                                </div>
                            </div>
                        </td>
                    </tr>
                </table>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
    <script type="text/javascript" language="javascript">

        // Function to confirm that user want to clear all entered fields.
        function ClearAllFields() {
            return confirm("All the details will be cleared, are you sure you want to clear all ?");
        }

        // Function to get the selected attendee name and reset the width of the scheduler control while adding/editing attendee time span.
        function ScheduleAttendee(attendeeName) {
            document.getElementById("txtAttendeeName").value = attendeeName.innerHTML;
            if (document.getElementById("hdnSchedulerWidth").value == "")
                document.getElementById("hdnSchedulerWidth").value = document.getElementById("tdMeetingScheduler").clientWidth;

            document.getElementById("btnEditSchedule").click();
        }

        // Function to cancel adding/editing time span for an attendee.
        function CancelAttendeeSchedule() {
            document.getElementById("tblScheduleAttendee").style.display = "none";
            document.getElementById("tdMeetingScheduler").style.width = "100%";
        }

        // Function to show/hide the room availability scheduler control.
        function ShowHideRoomSchedule(btnCntrl) {
            if (document.getElementById("tdMeetingRoomSchedule").style.display == "none") {
                btnCntrl.value = "Hide Room Availability";
                document.getElementById("tdMeetingRoomSchedule").style.display = "block";
            }
            else {
                btnCntrl.value = "Show Room Availability";
                document.getElementById("tdMeetingRoomSchedule").style.display = "none";
            }
        }

        // Function to validate the max length of multiline textbox.
        function truncMaxLength(txtControl, maxLength) {
            try {
                if (txtControl.value.length > maxLength) {
                    txtControl.value = txtControl.value.substring(0, maxLength);
                    alert("Maximum characters allowed is - " + maxLength.toString());
                    return false;
                }
            }
            catch (e) {
            }
        }

        // Function to compare the meeting attendee count and the selected room capacity.
        function CheckRoomCapacity() {
            var tempRoomCap = document.getElementById("hdnSelectedRoomCapacity").value;

            if (tempRoomCap != "") {
                var attCnt = parseInt(document.getElementById("hdnMeetingAttendeeCount").value);
                var roomCap = parseInt(tempRoomCap);

                if (roomCap < attCnt)
                    return confirm("The selected room capacity is less than the meeting attendee count, do you want to proceed ?");
                else
                    return true;
            }
            else
                return true;
        }       
    
    </script>
    </form>
</body>
</html>
